Array.prototype.my_some = function(fn, context) {
    const me = this

    const ctx = context ? context : this // 判断上下文

    if (typeof fn !== 'function') {
        throw new Error(`${fn} is not a function`)
    }
    
    for (let i = 0; i < me.length; i++) {
        const res = fn.call(ctx, me[i], i, me)
        if (res) {
            return true
        }
    }
    return false
}

const arr = [1,2,3,4]

console.log(arr.my_some((item) => item>4))

